﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="IncomingOrders.aspx.cs"
    Inherits="Web.Views.AgentManager.IncomingOrders" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>新进订单</title>
    <style type="text/css">
        body
        {
            font-size: 12px;
        }
    </style>
    <style type="text/css">
        #getplatform
        {
            position: absolute;
            background-color: #FF7A23;
            visibility: hidden;
            color: #FF7A23;
            background: #fcfcfc;
            border: 1px #ccc solid;
            border-color: #FF7A23;
            list-style: none;
            cursor: pointer;
        }
        .hint
        {
            border-bottom: 1px dashed #C1C1C1;
            background: #FFFFFF;
            color: #656565;
            font-size: 12px;
            padding-left: 6px;
        }
        .mover
        {
            background: #FFF4D2;
            padding-left: 6px;
            line-height: 120%;
            border-top: 1px solid #FB6E04;
            border-bottom: 1px solid #FB6E04;
            cursor: hand;
            font-size: 12px;
            color: #FF9A00;
        }
        .mout
        {
            background: #FFFFFF;
            line-height: 120%;
            border-top: 1px solid #FFFFFF;
            border-bottom: 1px solid #FFFFFF;
            padding-left: 6px;
            font-size: 12px;
            color: #FF9A00;
        }
        .selected
        {
            background: #FF9900;
            line-height: 120%;
            font-size: 12px;
            color: #FFFFFF;
            border-top: 1px solid #F2F8FF;
            border-bottom: 1px solid #F2F8FF;
            padding-left: 6px;
        }
        .tdleft
        {
            font-size: 12px;
            padding-left: 6px;
        }
        .tdright
        {
            padding-right: 4px;
        }
    </style>

    <script src="../../Content/JS/datatime.js" type="text/javascript"></script>

</head>
<body>
    <form id="form1" runat="server">
    <div style="border-width: 2px; border-color: #BFFFFF; width: 900px; border-top-style: groove;
        border-bottom-style: groove;">
        <div style="width: 155px; float: left;">
            订单号：<asp:TextBox ID="txtOrderNum" runat="server" Width="94px"></asp:TextBox></div>
        <div style="width: 339px; float: left;">
            日期：<%--<input id="inDate" runat="server" onblur="showHint(this,1)" style="width: 111px;
                color: #c1c1c1" onfocus="showHint(this,10,'outDate')" value="yyyy-mm-dd" name="inDate" />~
            <input id="outDate" runat="server" onblur="showHint(this,1)" style="width: 109px;
                color: #c1c1c1" onfocus="showHint(this)" value="yyyy-mm-dd" name="outDate" />--%>
            <asp:TextBox ID="inDate" runat="server" onblur="showHint(this,1)" Style="width: 111px;
                color: #c1c1c1" onfocus="showHint(this,10,'outDate')" value="yyyy-mm-dd" name="inDate"></asp:TextBox>
            <asp:TextBox ID="outDate" runat="server" onblur="showHint(this,1)" Style="width: 109px;
                color: #c1c1c1" onfocus="showHint(this)" value="yyyy-mm-dd" name="outDate"></asp:TextBox>
        </div>
        <div style="width: 150px;">
            <asp:Button ID="Button3" runat="server" Text="点击查询" OnClick="Button3_Click" /></div>
    </div>
    <div style="width: 900px; margin-top: 10px;">
        <div>
        </div>
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
            AllowPaging="True" DataSourceID="ObjectDataSource1"  AllowSorting="True">
            <Columns>
                <asp:TemplateField HeaderText="订单号" SortExpression="OrderNum">
                    <ItemTemplate>
                    <a href="OrderSelect.aspx?OrderID=<%#Eval("OrderID") %>"
                            style="color: Blue">
                            <%#Eval("OrderNum") %></a>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="车票日期" SortExpression="TicketDate">
                    <ItemTemplate>
                        <div style="width: 80px;">
                            <asp:Label ID="Label1" runat="server" Text='<%# Bind("TicketDate","{0:yyyy-MM-dd}") %>'></asp:Label></div>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:BoundField DataField="StartStation" HeaderText="出发站" SortExpression="StartStation" />
                <asp:BoundField DataField="EndStation" HeaderText="到站" SortExpression="EndStation" />
                <asp:BoundField DataField="Pew" HeaderText="座席" SortExpression="Pew" />
                <asp:BoundField DataField="Amount" HeaderText="张数" SortExpression="Amount" >
                <HeaderStyle HorizontalAlign="Center" />
                </asp:BoundField>
                <asp:BoundField DataField="AgentGet" HeaderText="金额" SortExpression="AgentGet"  DataFormatString="{0:￥#,##0.00}" />
                <asp:TemplateField HeaderText="联系人">
                    <ItemTemplate>
                        姓名：<%# Eval("UserName") %><br />
                        电话：<%# Eval("UserTelphone") %>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="订单日期" SortExpression="CreateOn">
                    <ItemTemplate>
                            <asp:Label ID="Label2" runat="server" Text='<%# Bind("CreateOn","{0:F}") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:BoundField DataField="OrderID" HeaderText="订单标识" SortExpression="OrderID" Visible="false" />
                <asp:TemplateField HeaderText="状态" SortExpression="OrderState">
                    <ItemTemplate>
                        <asp:Label ID="LabState" runat="server" Text='<%# Easydp.Controllers.OrderController.GetStateDispay(Convert.ToInt32(Eval("OrderState"))) %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="操作" >
                    <ItemTemplate>
                        <div style="width: 50px;">
                            <asp:Button ID="Button2" runat="server" Text="出票" CommandArgument="chu" CommandName='<%#Eval("OrderID") %>'
                                OnClick="btnUpload_Click" OnClientClick="return confirm('确定出票？')" />
                            <asp:Button ID="Button1" runat="server" Text="退票" CommandArgument="tui" CommandName='<%#Eval("OrderID") %>'
                                OnClick="btnUpload_Click" OnClientClick="return confirm('确定退票？')" />
                        </div>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:BoundField DataField="AgentID" HeaderText="售票点" SortExpression="AgentID" Visible="false" />
                <asp:BoundField DataField="TrainNumber" HeaderText="TrainNumber" SortExpression="TrainNumber"
                    Visible="False" />
               
            </Columns>
        </asp:GridView>
        <asp:HiddenField ID="HiddenField1" runat="server" />
        <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" 
            OldValuesParameterFormatString="original_{0}" SelectMethod="GetModel" 
            TypeName="Easydp.Controllers.OrderController">
            <SelectParameters>
                <asp:ControlParameter ControlID="HiddenField1" Name="AgentID" 
                    PropertyName="Value" Type="Int32" />
                <asp:ControlParameter ControlID="txtOrderNum" DefaultValue="" Name="ordernum" 
                    PropertyName="Text" Type="String" />
                <asp:ControlParameter ControlID="inDate" Name="inDate" PropertyName="Text" 
                    Type="String" />
                <asp:ControlParameter ControlID="outDate" Name="outDate" PropertyName="Text" 
                    Type="String" />
            </SelectParameters>
        </asp:ObjectDataSource>
    </div>
    </form>
</body>
</html>
